import request from '@/utils/request'

// 查询药材维护列表
export function listMedicine(query) {
  return request({
    url: '/zhongyao/medicine/list',
    method: 'get',
    params: query
  })
}

// 查询药材维护详细
export function getMedicine(medicineKey) {
  return request({
    url: '/zhongyao/medicine/' + medicineKey,
    method: 'get'
  })
}

// 新增药材维护
export function addMedicine(data) {
  return request({
    url: '/zhongyao/medicine',
    method: 'post',
    data: data
  })
}

// 修改药材维护
export function updateMedicine(data) {
  return request({
    url: '/zhongyao/medicine',
    method: 'put',
    data: data
  })
}

// 删除药材维护
export function delMedicine(medicineKey) {
  return request({
    url: '/zhongyao/medicine/' + medicineKey,
    method: 'delete'
  })
}
